package com.swagger.controller;

import io.swagger.annotations.*;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/User")
@Api(tags = {"用户控制器"})
public class UserController {

    @ResponseBody
    @GetMapping("/user/{id}")
    @ApiOperation(value = "根据用户编号获取用户json")
    @ApiImplicitParam(paramType = "path", dataType = "String", name = "id", value = "用户编号", required = true)
    @ApiResponses({
            @ApiResponse(code = 200, message = "请求成功"),
            @ApiResponse(code = 400, message = "请求失败")})
    public String getUser(@ApiParam("用户id") @PathVariable String id) {

        return id;
    }

}
